<#include "header.html">
<script type="text/javascript" src="js/sys_menu.js"></script>
<div class="c_nav">
	<span>管理选项：</span>
	<a href="sysMenuAction.do?method=query&parentCode=${menu.parentCode}&menuNode=${menuNode!}">返回列表</a>
	<a href="javascript:location.reload()"> | [刷新页面]</a>
</div>
<div class="c_box bg_white">
	<form id="menuForm" name="menuForm" action="?method=save" method="post">
	<div class="c_topic"><#if menu.id??>修改<#else>新增</#if>菜单信息</div>
	<div class="c_form_3 c_form-label-8">
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">系统模块：</span>
				<span class="e_select">
					<select name="moduleType" id="moduleType">
						<option value="0">系统模块</option>
					<#list moduleList as module>
						<option value="${module.menuCode!}"<#if module.menuCode == moduleCode> selected="selected" </#if>>${module.menuName!}</option>
					</#list>	
					</select>
				</span>
			</li>
			<li id="parentCodeLi" class="e_hide">
				<span class="e_label e_label-required">菜单节点：</span>
				<span class="e_select">
					<select name="parentCode" id="parentCode" desc="菜单节点" nullable="no">
					<#if nodeList??>	
					<#list nodeList as node>
						<option value="${node.menuCode!}"<#if node.menuCode == menu.parentCode> selected="selected" </#if>>${node.menuName!}</option>
					</#list>	
					</#if>
					</select>
				</span>
			</li>
		</ul>
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">节点名称：</span>
				<span class="e_input">
					<input type="text" name="menuName" id="menuName" desc="节点名称" nullable="no" maxlen="20" maxlength="20" value="${menu.menuName!}"/>
				</span>
			</li>
			<li>
				<span class="e_label e_label-required">节点编码：</span>
				<span class="e_input">
					<input type="text" name="menuCode" id="menuCode" desc="系统参数编码" nullable="no" maxlen="20" maxlength="20" <#if menu.menuCode??> readOnly="readOnly" </#if> value="${menu.menuCode!}"/>
				</span>
			</li>
		</ul>	
		<ul class="l_mb">
			<li>
				<span class="e_label e_label-required">排序字段：</span>
				<span class="e_input">
					<input type="text" name="seqSort" id="seqSort" desc="排序字段" nullable="no" datatype="number" maxlen="10" maxlength="10" value="${menu.seqSort!}"/>
				</span>
			</li>
			<li>
				<span class="e_label e_label-required">是否禁用：</span>
				<span class="e_radio">
					<label><input type="radio" name="closed" desc="是否禁用" nullable="no"<#if menu.closed==0> checked="checked"</#if> value="0"/> 正常</label>
					<label><input type="radio" name="closed" desc="是否禁用" nullable="no"<#if menu.closed==1> checked="checked"</#if> value="1"/> 禁用</label>
				</span>
			</li>
		</ul>	
		<ul class="l_mb">
			<li class="col_2">
				<span class="e_label<#if menuNode?? && menuNode!='1'> e_label-required</#if>">节点访问地址：</span>
				<span class="e_input">
					<input type="text" name="menuUrl" id="menuUrl" desc="节点访问地址" <#if menuNode?? && menuNode!='1'> nullable="no"</#if> maxlen="100" maxlength="100" value="${menu.menuUrl!}"/>
				</span>
			</li>
		</ul>	
		<ul class="l_mb">
			<li class="col_2">
				<span class="e_label">备注：</span>
				<span class="e_input">
					<input type="text" name="remark" id="remark" desc="备注" nullable="yes" maxlen="60" maxlength="60" value="${menu.remark!}"/>
				</span>
			</li>
		</ul>	
	</div>
	<#if params??>
	<div id="menuFuncPart" class="c_box bg_white">
		<div class="c_table">
		<table class="e_center">
			<tr>
				<th>功能操作</th>
				<th>功能操作联动</th>
				<th>执行动作</th>
				<th>跳转地址或JS执行片段</th>
			</tr>
	<#list params as p>
			<tr>
				<td class="e_left"><label class="e_checkbox"><input name="funcCode" type="checkbox" value="${p.code}" <#if p.flag> checked="checked"</#if> />&nbsp;${p.name}</label></td>
				<td>
					<div class="e_select">
						<select name="limitNum_${p.code}">
							<option value="0" <#if p.limitNum==0> selected="selected"</#if>>无联动</option>
							<option value="1" <#if p.limitNum==1> selected="selected"</#if>>单选</option>
							<option value="2" <#if p.limitNum==2> selected="selected"</#if>>多选</option>
						</select>
					</div>
				</td>
				<td>
					<div class="e_select">
						<select name="funcType_${p.code}">
							<option value="1" <#if p.type==1> selected="selected"</#if>>跳转地址</option>
							<option value="2" <#if p.type==2> selected="selected"</#if>>JavaScript脚本</option>
						</select>
					</div>
				</td>
				<td><div class="e_input"><input type="text" name="param_${p.code}" value="${p.param}" maxlength="100" style="width:400px;"/></div></td>
			</tr>
	</#list>	
		</table>
		</div>		
	</div>
	</#if>
	<div class="e_center">
		<input type="hidden" name="menuId" id="menuId" value="${menu.id!}"/>
		<input type="hidden" name="menuNode" id="menuNode" value="${menuNode!}"/>
		<button type="button" bind="save" bindForm="menuForm" class="e_btn-page">提交</button>
		<button type="reset" class="e_btn l_ml">重置</button>
	</div>
    </form>
</div>
<#include "footer.html">